package leetcode.simple.q371;

public class Main {
    public static void main(String[] args) {
        int sum = getSum(5, 7);
        System.out.println(sum);
    }

    public static int getSum(int a, int b) {
        int temp = 0;
        while (b != 0){
            temp = a ^ b;
            b = (a & b) << 1;
            a = temp;
        }
        return a;
    }
}
